﻿namespace RndMaterialDisposalService.Models.RequestModel
{
    public class TemporaryProcessDocumentElectronFlowReq
    {
        //1.更改申请
        public TechnologyModel technology { get; set; } = new TechnologyModel();
        //2.主管工程师审核
        public Task1Model task1 { get; set; } = new Task1Model();
        //2.1.部门经理审核
        public Task3Model task3 { get; set; } = new Task3Model();
        //3.临时工艺文件下发确认闭环栏
        public Task4Model task4 { get; set; } = new Task4Model();
        //4.临时工艺文件下发回收闭环栏
        public Task5Model task5 { get; set; } = new Task5Model();
        //上传附件
        public List<Attachment> UploadFiles { get; set; } = new List<Attachment>();
        public FormHeader formHeader { get; set; } = new FormHeader();
        public string? viteFormUrl { get; set; }
    }

    /// <summary>
    /// 1.更改申请
    /// </summary>
    public class TechnologyModel 
    {
        //生效日期
        public DateTime? TakeEffectTime { get; set; }
        //失效日期
        public DateTime? LoseEfficacyTime { get; set; }
        //有效性
        public bool? Effectiveness { get; set; }
        //创建时间
        public DateTime? CreateTime { get; set; }
        //中文姓名
        public string? CreateName { get; set; }
        //中文姓名编码
        public string? CreateUserId { get; set; }
        //中文姓名详细
        public List<ChoiceUserInfoModel> CreateInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //联系电话
        public string? Telephone { get; set; }
        //所属部门
        public string? AffiliationDepartment { get; set; }
        //所属部门编码
        public string? AffiliationDepartmentID { get; set; }
        //所属部门详细
        public DropDownBoxPickModel? AffiliationDepartmentInfo { get; set; }
        //产品类别
        public string? ProductType { get; set; }
        //产品类别编码
        public string? ProductTypeID { get; set; }
        //产品类别详细
        public DropDownBoxPickModel? ProductTypeInfo { get; set; }
        //更改部位
        public string? ChangeParts { get; set; }
        //更改部位编号
        public string? ChangePartsID { get; set; }
        //更改部位详细
        public DropDownBoxPickModel? ChangePartsInfo { get; set; }
        //Item
        public string? Item { get; set; }
        //评审链接与结论
        public string? ReviewLinkAndConclusion { get; set; }
        //临时工艺文件名称
        public string? TemporaryFileName { get; set; }
        //状态
        public string? Status { get; set; }
        //更改原因
        public string? ChangeReason { get; set; }
        //文件内容
        public string? FileContent { get; set; }
        //请选择文件执行生产中心
        public List<string> DocumentExecutionProductionCenter { get; set; } = new List<string>();
        //请选择文件下发部门
        public List<string> FileDistributeDepartment { get; set; } = new List<string>();
        //请选择文件下发部门编码
        public List<string> FileDistributeDepartmentID { get; set; } = new List<string>();
        //请选择文件下发部门详细
        //public DropDownBoxPickModel? FileDistributeDepartmentInfo { get; set; }
        //更改有效截止日期
        public DateTime? ChangesEffectiveTime { get; set; }
        //IsMCCountersign 
        public string? SupplementCCName { get; set; }
        //抄送人员ID
        public string? SupplementCCId { get; set; }
        //抄送人员详细
        //public List<ChoiceUserInfoModel> SupplementCCList { get; set; } = new List<ChoiceUserInfoModel>();
        //是否需要MC会签
        public bool? IsMCCountersign { get; set; }
        //MC会签人员
        public string? MCCountersignUser { get; set; }
        //MC会签人员ID
        public string? MCCountersignUserId { get; set; }
        //指定直接部门主管工程师
        public string? EngineerInChargeName { get; set; }
        //指定直接部门主管工程师详细
        public List<ChoiceUserInfoModel> EngineerInChargeNameItem { get; set; } = new List<ChoiceUserInfoModel>();
        //文档下发人员
        public string? DocumentDistributionName { get; set; }
        //文档下发人员ID
        public string? DocumentDistributionUserID { get; set; }
    }

    /// <summary>
    /// 2.MC确认返修工段
    /// </summary>
    public class Task1Model 
    {
        //审核结论
        public string? Approval { get; set; }
        //返修工段
        public string? RepairSection { get; set; }
        //抄送人员
        public string? CCUserName { get; set; }
        //抄送人员ID
        public string? CCUserId { get; set; }

    }

    /// <summary>
    /// 3.主管审核
    /// </summary>
    public class Task3Model 
    {
        //审核结论
        public string? Approval { get; set; }
        //抄送人员
        public string? CCUserName { get; set; }
        //抄送人员详细
        public string? CCUserId { get; set; }
        //说明
        public string? Comment { get; set; }
    }

    /// <summary>
    /// 4.临时工艺文件下发确认闭环栏
    /// </summary>
    public class Task4Model {
        //审核结论
        public string? Approval { get; set; }
        //说明
        public string? Comment { get; set; }
        //知会人员
        public string? CCUserName { get; set; }
        //知会人员详细
        public string? CCUserId { get; set; }
    }

    /// <summary>
    /// 5.临时工艺文件下发回收闭环栏
    /// </summary>
    public class Task5Model {
        //审核结论
        public string? Approval { get; set; }
        //说明
        public string? Comment { get; set; }
        //知会人员
        public string? CCUserName { get; set; }
        //知会人员详细
        public string? CCUserId { get; set; }
    }

    /// <summary>
    /// 查询条件
    /// </summary>
    public class TemporaryProcessDocumentReportConditionModel 
    {
        public string? CurrentStatus { get; set; }
        public string? CreateName { get; set; }
        public string? AffiliationDepartment { get; set; }
        public string? ProductType { get; set; }
        public string? Item { get; set; }
        public string? ApplicationNumber { get; set; }
        public string? Effectiveness { get; set; }
        public string? ApplicantTime { get; set; }
        public string? TemporaryFileName { get; set; }
        public string? CurrentUser { get; set; }
        public int pageIndex { get; set; }
        public int pageSize { get; set; }
    }

    /// <summary>
    /// 提前失效实体
    /// </summary>
    public class FallimentoPrecoceModel 
    {
        public List<string> ProcInstIdList { get; set; } = new List<string>();
    }

    /// <summary>
    /// 根据流程实例ID获取表单数据
    /// </summary>
    public class TemporaryProcessDocumentProcessProcInstIdModel
    {
        public List<string> ProcInstIdList { get; set; } = new List<string>();
    }

    public class TemporaryProcessDocumentProcessFormDataModel 
    {
        public string ProcInstId { get; set; }
        public string FormData { get; set; }
    }

    public class DistributeFilesEmail 
    {
        public string ProcInstId { get; set; }
        public string Email { get; set; }
    }

    public class EmailParameter
    {
        public string ProcInstId { get; set; }
        public string Subject { get; set; }
        public string DocumentDistributionUserID { get; set; }
        public string FunctionId { get; set; }
        public string ViteFormUrl { get; set; }
    }

}
